<?php
class ABException extends Exception{
	public function __construct($s_msg) {
		parent::__construct($s_msg);
	}
	
	public static function hException($o_exception, $s_view = 'main'){
		echo $o_exception->getMessage();
		return;
		$o_tpl =  new ABView('error', $s_view);
		$o_tpl->error = $o_exception->getMessage();
		$o_tpl->file = $o_exception->getFile();
		$o_tpl->line = $o_exception->getLine();
		$o_tpl->render();
		die();
	}
	
	public static function hError($i_err, $s_err, $s_file, $i_lerr){
		if(!defined('DEBUG_MODE')){
			ABapi::trace("$s_err, in file: '$s_file',  #$i_lerr");
		}else{
			$o_tpl =  new ABView('error','main');
			$o_tpl->error = $s_err;
			$o_tpl->file = $s_file;
			$o_tpl->line = $i_lerr;
			$o_tpl->render();
			die();
		}
	}
}
